package jsj.mynet;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;

public class MyTcpDemo {

	public static void main(String[] args) {
		Socket s;
		try {
			
			ServerSocket ss = new ServerSocket(10086);
			s = new Socket("10.16.96.80", 10086);
			
			MyTcpServer mts = new MyTcpServer(ss);
			MyTcpClient mtc = new MyTcpClient(s);
			
			Thread client = new Thread(mtc);
			Thread server = new Thread(mts);
			
			client.start();
			server.start();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		

	}

}
